﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.SqlClient;
using System.Configuration;

/// <summary>
/// Summary description for get_DBinderectc
/// </summary>
/// 
namespace Bestlife.ERP.DataAccess
{
    public class get_DBinderectc
    {
        public get_DBinderectc()
        {
            //
            // TODO: Add constructor logic here
            //
        }

        public double GetDBCommition(string Did) 
        {
            double indcommition=0;

            try
            {//try

                String connStr = ConfigurationManager.ConnectionStrings["MainConnStr"].ConnectionString;
                Bestlife.ERP.DataAccess.clsCon.connect(connStr);


                String sqlstatus = "SELECT * from Bonus where User_id='" + Did + "'";
                SqlDataReader rdRStatus;
                rdRStatus = clsCon.ReadTable(sqlstatus);


                if (rdRStatus.Read())
                {
                   
                }


            }//try


            catch (Exception err)
            {


            }

            finally
            {
                clsCon.conn_new.Close();

            }   //finally


            return indcommition;
        }
    }
}